package com.yxym.generic;

public class CustomMethodGenericExercise {
    public static void main(String[] args) {
        Apple<Object, Object, Object> apple = new Apple<>();
        apple.hi(new Dog("小黑",2));
        apple.hi(20);
    }
}

class Apple<T ,R,M>{//自定义
    public<E> void hi(E e){
        System.out.println(e.getClass());
    }
}
